﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ControllerLayer.PatientInformation;

namespace ViewLayer.PatientInformationView
{
    public partial class NewNoteCategoryView : Form
    {
        public NewNoteCategoryView()
        {
            InitializeComponent();
        }

        private void NewNoteCategoryView_Load(object sender, EventArgs e)
        {
            this.noteSeverityEnum_TableAdapter.Fill(this.patientNoteDataSet1.NoteSeverityEnum_);
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            Guid oid = Guid.NewGuid(); 
            this.patientNoteCategory_TableAdapter.InsertQuery(oid,textBoxName.Text, textBoxDescription.Text, comboBoxSeverity.SelectedValue.ToString());
            PatientInformationViewController.newPatientNoteCategoryOID = oid.ToString();
            this.Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            PatientInformationViewController.newPatientNoteCategoryOID = "none";
            this.Close();
        }
    }
}
